<!-- INCLUDE ucp_header.html -->
<script type="text/javascript">
// <![CDATA[
	/**
	* Some functions for the AJAX checker
	*/
	function createRequestObject() {
	    var ro;
	    var browser = navigator.appName;
	    if(browser == "Microsoft Internet Explorer"){
	        ro = new ActiveXObject("Microsoft.XMLHTTP");
	    } else {
	        ro = new XMLHttpRequest();
	    }
	    return ro;
	}
	
	var http = createRequestObject();
	
	function sndReq(mode, valuename1, value1, valuename2, value2) {
		// Show that the request is running
		if (mode == 'usernamecheck' && document.getElementById('username').value != ''){
			document.getElementById('usernamecheck').innerHTML = '{AJAX_CHECKING_IMG}&nbsp;{L_AJAX_CHECKING_USERNAME}';
		} else if (mode == 'passwordcheck' && document.getElementById('new_password').value != '' && document.getElementById('password_confirm').value != '') {
			document.getElementById('passwordcheck').innerHTML = '{AJAX_CHECKING_IMG}&nbsp;{L_AJAX_CHECKING_PASSWORD}';
		} else if (mode == 'emailcheck' && document.getElementById('email').value != '' && document.getElementById('email_confirm').value != '') {
			document.getElementById('emailcheck').innerHTML = '{AJAX_CHECKING_IMG}&nbsp;{L_AJAX_CHECKING_EMAIL}';
		} else {
			return false;
		}
		
		// Make the request
	    http.open('get', '{AJAX_CHECKS_FILE}?mode='+mode+'&'+valuename1+'='+value1+'&'+valuename2+'='+value2);
	    http.onreadystatechange = handleResponse;
	    http.send(null);
	}
	
	function handleResponse() {
	    if(http.readyState == 4){
	        var response = http.responseText;
	        var update = new Array();
	
	        if(response.indexOf('|' != -1)) {
	            update = response.split('|');
	            document.getElementById(update[0]).innerHTML = update[1];
	        }
	    }
	}
// ]]>
</script>

<table class="tablebg" width="100%" cellspacing="1">
<tr>
	<th colspan="2" valign="middle">{L_TITLE}</th>
</tr>
<!-- IF S_FORCE_PASSWORD -->
	<tr>
		<td class="row3" colspan="2" align="center"><span class="gensmall">{L_FORCE_PASSWORD_EXPLAIN}</span></td>
	</tr>
<!-- ENDIF -->
<!-- IF ERROR -->
	<tr>
		<td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td>
	</tr>
<!-- ENDIF -->

<tr>
	<td class="row1" width="35%"><b class="genmed"><label <!-- IF S_CHANGE_USERNAME -->for="username"<!-- ENDIF -->>{L_USERNAME}:</label></b><br /><span>{L_USERNAME_EXPLAIN}</span></td>
	<td class="row2"><!-- IF S_CHANGE_USERNAME --><input type="text" name="username" id="username" value="{USERNAME}" class="inputbox" title="{L_USERNAME}" onblur="sndReq('usernamecheck', 'username', this.value, 'ignore', 'ignore')" /><span id="usernamecheck"></span><!-- ELSE --><strong>{USERNAME}</strong><!-- ENDIF --></td>
</tr>

<tr>
	<td class="row1" width="35%"><b class="genmed"><label for="email">{L_EMAIL_ADDRESS}:</label></b></td>
	<td class="row2"><!-- IF S_CHANGE_EMAIL --><input type="text" name="email" id="email" maxlength="100" value="{EMAIL}" class="inputbox" title="{L_EMAIL_ADDRESS}" onblur="sndReq('emailcheck', 'email1', this.value, 'email2', document.getElementById('email_confirm').value)" /><span id="emailcheck"></span><!-- ELSE --><strong>{EMAIL}</strong><!-- ENDIF --></td>
</tr>
	<!-- IF S_CHANGE_EMAIL -->
<tr>
	<td class="row1" width="35%"><b class="genmed"><label for="email_confirm">{L_CONFIRM_EMAIL}:</label></b><br /><span>{L_CONFIRM_EMAIL_EXPLAIN}</span></td>
	<td class="row2"><input type="text" name="email_confirm" id="email_confirm" maxlength="100" value="{CONFIRM_EMAIL}" class="inputbox" title="{L_CONFIRM_EMAIL}" onblur="sndReq('emailcheck', 'email1', document.getElementById('email').value, 'email2', this.value)" /></td>
</tr>
	<!-- ENDIF -->

	<!-- IF S_CHANGE_PASSWORD -->
<tr>
	<td class="row1" width="35%"><b class="genmed"><label for="new_password">{L_NEW_PASSWORD}:</label></b><br /><span>{L_CHANGE_PASSWORD_EXPLAIN}</span></td>
	<td class="row2"><input type="password" name="new_password" id="new_password" maxlength="255" value="{NEW_PASSWORD}" class="inputbox" title="{L_CHANGE_PASSWORD}" onblur="sndReq('passwordcheck', 'password1', this.value, 'password2', document.getElementById('password_confirm').value)" /><br /><span id="passwordcheck"></span></td>
</tr>

<tr>
	<td class="row1" width="35%"><b class="genmed"><label for="password_confirm">{L_CONFIRM_PASSWORD}:</label></b><br /><span>{L_CONFIRM_PASSWORD_EXPLAIN}</span></td>
	<td class="row2"><input type="password" name="password_confirm" id="password_confirm" maxlength="255" value="{PASSWORD_CONFIRM}" class="inputbox" title="{L_CONFIRM_PASSWORD}" onblur="sndReq('passwordcheck', 'password1', document.getElementById('new_password').value, 'password2', this.value)" /></td>
</tr>
	<!-- ENDIF -->
<tr>
	<td class="row1" width="35%"><b class="genmed"><label for="cur_password">{L_CURRENT_PASSWORD}:</label></b><br /><span><!-- IF S_CHANGE_PASSWORD -->{L_CURRENT_CHANGE_PASSWORD_EXPLAIN}<!-- ELSE -->{L_CURRENT_PASSWORD_EXPLAIN}<!-- ENDIF --></span></td>
	<td class="row2"><input type="password" name="cur_password" id="cur_password" maxlength="255" value="{CUR_PASSWORD}" class="inputbox" title="{L_CURRENT_PASSWORD}" /></td>
</tr>
<tr>
	<td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" name="reset" /></td>
</tr>
</table>

<!-- INCLUDE ucp_footer.html -->